// crypto.h
// source: Dr. Dobbs
//   http://www.drdobbs.com/encrypting-and-decrypting-data-with-the/184416394?pgno=2

class CMyCrypto {
public:
	CMyCrypto(LPTSTR lpPassword, ALG_ID algorithm);
	~CMyCrypto();

	BOOL Encrypt(LPBYTE pData, LPDWORD pdwDataSize,
		DWORD dwBufferSize, BOOL bFinal);
	BOOL Decrypt(LPBYTE pData, LPDWORD dwDataSize,
		BOOL bFinal);
	BOOL HasConstructorError();

private:
	HCRYPTPROV m_hProv;
	HCRYPTKEY m_hKey;
	BOOL m_hasConstructorError;
};